package hn.sigit.model.hnd.administrative;

import hn.sigit.model.ladm.administrative.LA_AdministrativeSource;
import hn.sigit.model.hnd.administrative.HND_Request;

import java.io.Serializable;
import javax.persistence.*;

@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="HND_Transaction", schema="hnd_administrative")
@Inheritance(strategy=InheritanceType.JOINED)
public class HND_Transaction extends LA_AdministrativeSource implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public HND_Transaction() {
	}
	
	private String approverFullName;
	private String approverUserName;
	private HND_Request request;
	

	@Column(name="ApproverFullName", nullable=true, length=255)
	public String getApproverFullName() {
		return approverFullName;
	}
	public void setApproverFullName(String approverFullName) {
		this.approverFullName = approverFullName;
	}

	@Column(name="ApproverUserName", nullable=true, length=255)
	public String getApproverUserName() {
		return approverUserName;
	}
	public void setApproverUserName(String approverUserName) {
		this.approverUserName = approverUserName;
	}

	@OneToOne(mappedBy="transaction", targetEntity=HND_Request.class, fetch=FetchType.LAZY)
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)
	public HND_Request getRequest() {
		return request;
	}
	public void setRequest(HND_Request request) {
		this.request = request;
	}
	
	public String toString() {
		return super.toString();
	}
}
